﻿@model WebVideo.Areas.Admin.Models.UserModel  
@{
    ViewBag.Title = "View";
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}
<script src="@Url.Content("~/Content/cssAdmin/js/plugins/jquery-1.7.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Content/cssAdmin/js/plugins/jquery-ui-1.8.16.custom.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Content/cssAdmin/js/plugins/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Content/cssAdmin/js/plugins/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<div class="maincontentinner">
    <ul class="maintabmenu">
        <li class="current"><a href="@Url.Action("Index", "User")" >Index</a></li>
   
    </ul>
    <div class="contenttitle">
    <h2 class="form"><span>View</span></h2>
    </div>

    @using (Html.BeginForm("Edit", "User",
            new { ReturnUrl = ViewBag.ReturnUrl },
            FormMethod.Post, new { @class = "stdform stdform2" }))
    {
        <p>
            <label>Username</label>
            <span class="field">
                @Html.DisplayFor(model => model.UserName).
            </span>
        </p>
        <p>

            <label>Họ Tên</label>
            <span class="field">
                @Html.DisplayFor(model => model.Name).
            </span>
        </p>
        <p>
            <label>Năm Sinh </label>
            <span class="field">
                @Html.DisplayFor(model => model.YearBorn).
            </span>
        </p>
        <p>
            <label>Giới Tính </label>
            <span class="field">
                @Html.DisplayFor(model => model.Sex).
            </span>
        </p>
        <p>
            <label>Tỉnh/Thành Phố </label>
            <span class="field">
                @Html.DisplayFor(model => model.City).
            </span>
        </p>
         <p>
            <label>Hình Avatar</label>
            <span class="field">
                @{
        var imageFile = "~/Content/Images/Avatar/";
        if (@Model.Avatar != null)
        {
            imageFile += @Model.Avatar;
        }
        else
        {
            imageFile += "no-photo.jpg";
        }
                            }
                <img src="@Url.Content(@imageFile)" alt="" style="height:100px; width:100px" />
            </span>
        </p>
        <p>
            <label>Email </label>
            <span class="field">
                @Html.DisplayFor(model => model.Email).
            </span>
        </p>
        <p>
            <label>Tài Khoản Ngân Hàng </label>
            <span class="field">
                @Html.DisplayFor(model => model.BankAccount).
            </span>
        </p>
         <p>
            <label>Tên Ngân Hàng </label>
            <span class="field">
                @Html.DisplayFor(model => model.NameBank).
            </span>
        </p>
        <p>
            <label>Link </label>
            <span class="field">
                @Html.DisplayFor(model => model.Link).
            </span>
        </p>
        <p>
            <label>Bạn Bè Mời </label>
            <span class="field">
                @Html.DisplayFor(model => model.UserNameRoot) .
            </span>
        </p>
        <p>
            <label>Địa Chỉ IP </label>
            <span class="field">
                @Html.DisplayFor(model => model.Ip) .
            </span>
        </p>
        <p>
            <label>Điểm Video </label>
            <span class="field">
                @Html.DisplayFor(model => model.PointVideo).
            </span>
        </p>
        <p>
            <label>Điểm Bạn Bè cấp 1</label>
            <span class="field">
                @Html.DisplayFor(model => model.PointFriend1).
            </span>
        </p>
         <p>
            <label>Điểm Bạn Bè cấp 2 </label>
            <span class="field">
                @Html.DisplayFor(model => model.PointFriend2).
            </span>
        </p>
        <p>
            <label>Trạng Thái </label>
            @{
        if (@Html.DisplayFor(model => model.Status).ToString() == "1")
        {
                <span class="field">Đang hoạt động</span>
        }
        else
        {
                <span class="field">Đã bị BAN</span>
        }   
            }


        </p>
        
        <div class="contenttitle">
    <h2 class="form"><span>List Video For User</span></h2>
    </div>
       <table border="0" class="stdtable" id="dyntable">
        <colgroup>
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
        </colgroup>
        <thead>
            <tr>
                <th class="head0">Id</th>
                <th class="head1">Username</th>
                <th class="head1">Video</th>
                <th class="head0">Date</th>
                @*<th class="head1"></th>*@
     
            </tr>
        </thead>
        <tfoot>
            <tr>
              <th class="head0">Id</th>
                <th class="head1">Username</th>
                <th class="head1">Video</th>
                <th class="head0">Date</th>
            @*    <th class="head1"></th>*@

            </tr>
        </tfoot>
        <tbody>     
          @{
        foreach (var item in Model.DSVideo)
        {
              <tr class="gradeX">
                    <td>
                   @*   //  @Html.DisplayFor(modelitem => item.Id)*@
                    </td>
                    <td>
                        @Html.DisplayFor(modelitem => item.UserName)
                    </td>
                    <td>
                         @Html.ActionLink( item.EntityVideo.Name, "View","Video", new { IdVideo = @item.EntityVideo.Id }, new {title = "Chi tiết" })
                     
                    </td>
                    <td>
                        @Html.DisplayFor(modelitem => item.Date)
                    </td>                  
                @*  <td class ="eddelete">
                         @if(@item.EntityVideo.TypeQuestion  == 1)
                           {
                                 @Html.ActionLink(" ", "Index", "Questions_Essay", new { Id = @item.Id },  new { @class ="tn" , title="Tự Luận"})
                           }
                             @if (@item.EntityVideo.TypeQuestion == 2)
                             {
                                 @Html.ActionLink(" ", "Index", "Questions_MultipleChoice", new { Id = @item.Id }, new { @class = "tn", title = "Trắc Nghiệm" })         
                             }          
                  </td>*@
                  </tr>
                
        }
    }
            </tbody>
          
      </table>
        <div class="contenttitle">
    <h2 class="form"><span>List Report Point</span></h2>
</div>
<!--contenttitle-->
<table cellpadding="0" cellspacing="0" border="0" class="stdtable" id="dyntable">
    <colgroup>
        <col class="con0" />
        <col class="con1" />
        <col class="con0" />
        <col class="con1" />
        <col class="con0" />
    </colgroup>
    <thead>
        <tr>
            <th class="head0">Id</th>
            <th class="head1">UserName</th>
            <th class="head1">Số Điểm</th>
            <th class="head1">Ngày báo cáo</th>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <th class="head0">Id</th>
            <th class="head1">UserName</th>
            <th class="head1">Số Điểm</th>
            <th class="head1">Ngày báo cáo</th>
        </tr>
    </tfoot>
    <tbody>
        @{
        foreach (var item in Model.DSPoint)
        {
            <tr class="gradeX">
                <td>
                    @Html.DisplayFor(modelitem => item.Id)
                </td>
                <td>
                    @Html.DisplayFor(modelitem => item.UserName)
                </td>
                <td>
                    @Html.DisplayFor(modelitem => item.Pointed)
                </td>
                <td>
                    @Html.DisplayFor(modelitem => item.Date)
                </td>              
            </tr> 
        }                       
        }
    </tbody>
</table>
        
        
        <p class="stdformbutton">
            <input type="submit" value="Quay lại" onclick="javascript: history.back(); return false" />
        </p>   
    }
    <br clear="all" />
</div>
<!--maincontentinner-->

